﻿namespace TimeTravel.XnaLibrary.GamePlay
{
	/// <summary>
	/// Represents a predicate to be used as a condition in a IPriorityOrder.
	/// </summary>
	public delegate bool PriorityOrderCondition(Player player);

	/// <summary>
	/// Represents a method to be used as command in a IPriorityOrder.
	/// </summary>
	public delegate void PriorityOrderCommand(Player player);

	/// <summary>
	/// Defines properties needed for creating and using a priority order.
	/// </summary>
	public interface IPriorityOrder
	{
		/// <summary>
		/// Gets the level of importance of this order.
		/// </summary>
		int Priority { get; }
		
		/// <summary>
		/// Gets the command to be executed by this order.
		/// </summary>
		PriorityOrderCommand Command { get; }

		/// <summary>
		/// Gets a condition to be met before executing this order.
		/// </summary>
		PriorityOrderCondition Condition { get; }
	}
}
